package com.hspedu.homework.homework13;

public class Student extends Person {

    private int syu_id;

    public int getSyu_id() {
        return syu_id;
    }

    public void setSyu_id(int syu_id) {
        this.syu_id = syu_id;
    }

    public Student(String name, char gender, int age, int syu_id) {
        super(name, gender, age);
        this.syu_id = syu_id;
    }

    public void study() {
        System.out.println("我承诺，我会好好学习。");
    }

    public void f(Person person) {
        ((Student)person).study();
    }

    @Override
    public String play() {
        return getName() + "爱玩足球";
    }

    public void print() {
        System.out.println("学生的信息:\n" + "姓名: " + getName() +
                "\n年龄: " + getAge() + "\n性别: " +
                getGender() + "\n学号: " + syu_id);
        study();
        System.out.println(play());
    }
}
